package com.kis.pattern.adapter;

import com.kis.pattern.adapter.api.LogDbApi;
import com.kis.pattern.adapter.api.LogFileApi;
import com.kis.pattern.adapter.pojo.Log;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yks on 15-11-12.
 * 适配器对象
 */
public class Adapter implements LogDbApi{
    private LogFileApi fileApi;

    public Adapter() {
    }

    public Adapter(LogFileApi fileApi) {
        this.fileApi = fileApi;
    }

    public void add() {
        List<Log> log = new ArrayList<Log>();
        fileApi.write(log);
    }

    public void del() {

    }

    public void modify() {

    }

    public void query() {
        fileApi.readLog();
    }
}
